Forgetting { done: true } causes infinite loops in constructs like for...of, as they never receive a termination signal, leading to an infinite loop or memory exhaustion.
If a custom iterator never returns { done: true }, constructs that consume iterators (e.g., for...of, Array.from, spread ...) will continue calling next() indefinitely, causing an infinite loop. This can freeze the program or crash due to memory exhaustion. Always ensure the iterator eventually signals completion.